﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReceiptList.aspx.cs" Inherits="SalesManagement.Modules.Sales.ReceiptList" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    <ext:Viewport ID="Viewport1" runat="server" Layout="RowLayout">
        <Items>
            <ext:Toolbar ID="tbMain" runat="server">
                <Items>
                    <ext:Button runat="server" ID="btnNew" Icon="PageAdd" Text="Tạo mới">
                        <ToolTips>
                            <ext:ToolTip ID="ToolTip9" runat="server" Title="Ctr+N">
                            </ext:ToolTip>
                        </ToolTips>
                        <%--    <Listeners>
                                    <Click Handler="BeforCheckNewClick();" />
                                </Listeners>--%>
                    </ext:Button>
                    <ext:ToolbarSeparator />
                    <ext:Button runat="server" ID="btnUpdate" Text="Sửa" Icon="PageEdit">
                    </ext:Button>
                    <ext:ToolbarSeparator />
                    <ext:Button runat="server" ID="btnDelete" Text="Xóa" Icon="Delete">
                        <ToolTips>
                            <ext:ToolTip ID="ToolTip8" runat="server" Title="Shift+Delete">
                            </ext:ToolTip>
                        </ToolTips>
                        <%--    <Listeners>
                                    <Click Handler="ConfigDeleteObject()" />
                                </Listeners>--%>
                    </ext:Button>
                </Items>
            </ext:Toolbar>
            <ext:Panel ID="Panel1" runat="server" Frame="true" Height="100" Layout="ColumnLayout">
                <Defaults>
                    <ext:Parameter Name="Anchor" Value="99%">
                    </ext:Parameter>
                </Defaults>
                <Items>
                    <ext:Panel ID="Panel2" runat="server" ColumnWidth="0.5" Layout="FormLayout" LabelWidth="100">
                        <Defaults>
                            <ext:Parameter Name="Anchor" Value="99%">
                            </ext:Parameter>
                        </Defaults>
                        <Items>
                            <ext:TextField runat="server" ID="txtVoucherNo" FieldLabel="Số phiếu">
                            </ext:TextField>
                            <ext:DateField ID="dfDateFrom" runat="server" FieldLabel="Từ ngày" />
                            <ext:ComboBox ID="ComboBox5" runat="server" FieldLabel="Phương thức" Editable="false"
                                DataIndex="Title" />
                        </Items>
                    </ext:Panel>
                    <ext:Panel ID="Panel3" runat="server" ColumnWidth="0.4" Layout="FormLayout" LabelWidth="90">
                        <Defaults>
                            <ext:Parameter Name="Anchor" Value="99%">
                            </ext:Parameter>
                        </Defaults>
                        <Items>
                            <ext:ComboBox ID="cbCustomer" runat="server" FieldLabel="Nhà cung cấp" Editable="false"
                                DataIndex="Title" />
                            <ext:DateField ID="dfDateTo" runat="server" FieldLabel="Đến ngày" />
                            <ext:TextField ID="txtBondNo" runat="server" FieldLabel="Tổng tiền" />
                        </Items>
                    </ext:Panel>
                    <ext:Panel ID="pnlPackCenter" runat="server" Layout="VBoxLayout" ColumnWidth="0.1">
                        <Defaults>
                            <ext:Parameter Name="margins" Value="0 0 5 0" Mode="Value" />
                        </Defaults>
                        <LayoutConfig>
                            <ext:VBoxLayoutConfig Padding="5" Align="Center" Pack="Center" />
                        </LayoutConfig>
                        <Items>
                            <ext:Button ID="Button1" runat="server" Text="Tìm kiếm" Icon="Magnifier" FormBind="true"
                                Width="60" Height="30">
                            </ext:Button>
                        </Items>
                    </ext:Panel>
                </Items>
            </ext:Panel>
            <ext:GridPanel ID="grCashPaymentList" runat="server" AutoExpandColumn="clProvider"
                RowHeight="1" ColumnLines="true">
                <Store>
                    <ext:Store ID="Store1" runat="server">
                        <Reader>
                            <ext:JsonReader IDProperty="VoucherInId">
                                <Fields>
                                    <ext:RecordField Name="VoucherInId" />
                                    <ext:RecordField Name="VoucherInNo" />
                                    <ext:RecordField Name="VocherInDate" Type="Date" />
                                    <ext:RecordField Name="ObjectName" />
                                    <ext:RecordField Name="MaturityName" />
                                </Fields>
                            </ext:JsonReader>
                        </Reader>
                    </ext:Store>
                </Store>
                <ColumnModel ID="ColumnModel1" runat="server">
                    <Columns>
                        <ext:Column ColumnID="clVoucherNo" DataIndex="VoucherInNo" Header="Số phiếu" />
                        <ext:DateColumn ColumnID="clVocherInDate" DataIndex="VocherInDate" Format="dd/MM/yyyy"
                            Header="Ngày tạo">
                        </ext:DateColumn>
                        <ext:Column ColumnID="clProvider" Header="Nhà cung cấp" DataIndex="ObjectName" />
                        <ext:Column DataIndex="clVatAmount" Header="VAT" />
                        <ext:Column DataIndex="clTotalAmount" Header="Tổng tiền" />
                        <ext:Column DataIndex="clTotalAmount" Header="Phương thức" />
                        <ext:Column DataIndex="clTotalAmount" Header="Lý do thu" />
                    </Columns>
                </ColumnModel> 
                <LoadMask ShowMask="true" />
            </ext:GridPanel>
        </Items>
    </ext:Viewport>
    </form>
</body>
</html>
